<template>
  <div class="rfhome-comp-ct c_page">
    <van-nav-bar :title="componentName"></van-nav-bar>
    <div class="c_container c_home">
      <div
        class="home_button button_1"
        style="height:25%;width:80%;"
        @click="goin('/bj_projectList')"
      >
        <van-icon name="newspaper-o" />
        <p>质量监督登记</p>
      </div>
      <div style="height:65%;width:80%;display: -webkit-flex;display: flex;">
        <div
          class="home_button button_2"
          style="height:100%;flex:1 0 auto;"
          @click="goin('/xc_projectList')"
        >
          <van-icon name="bar-chart-o" />
          <p>现场监督记录</p>
        </div>
        <div
          style="height:100%;flex:1 0 auto;display: -webkit-flex;display: flex;flex-direction: column;"
        >
          <div class="home_button button_5" style="flex:1 0 auto" @click="test_api">
            <van-icon name="todo-list-o" />
            <p>待办信息</p>
          </div>
          <div class="home_button button_3" style="flex:1 0 auto">
            <van-icon name="apps-o" />
            <p>历史数据查询</p>
          </div>
          <div class="home_button button_4" style="flex:1 0 auto">
            <van-icon name="logistics" />
            <p>请假休假管理</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import {Toast} from 'vant'
export default {
  name: "rfhome",
  data() {
    return {
      componentName: "人防项目质量监督"
    };
  },
  methods: {
    goback() {
      this.$router.back(-1);
    },
    goin(target) {
      // Toast({
      //   message:'title-1',
      //   position:'bottom'
      // })
      this.$router.push(target);
    },
    test_api() {
      Toast('building')
      if (this.$G.apiReady) {
        _cnjs.getPhoto()
      }else{
        Toast('非apiloader调试模式！')
      }
    }
  }
};
</script>
<style lang="scss" scoped>
.rfhome-comp-ct {
  .c_home {
    // background-color: rgb(95, 131, 223);
    background: linear-gradient(rgb(109, 155, 241), rgb(41, 90, 214));
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  .home_button {
    // border: 1px solid;
    margin: 2px;
    display: -webkit-flex;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #fff;
    .van-icon {
      font-size: 35px;
      padding: 5px;
    }
    p {
      margin-block-start: 0.3em;
      margin-block-end: 0.3em;
    }
  }
  .button_1 {
    background-color: rgb(243, 153, 78);
  }
  .button_2 {
    background-color: rgb(60, 156, 74);
  }
  .button_3 {
    background-color: rgb(98, 201, 175);
  }
  .button_4 {
    background-color: rgb(233, 111, 124);
  }
  .button_5 {
    background-color: rgb(240, 58, 246);
  }
}
</style>
